package intelligentcity.model.streets;

import intelligentcity.model.Move;
import intelligentcity.model.Point;

public class HorizontalOneWayStreet extends OneWayStreet {

    public HorizontalOneWayStreet(int x1, int y1, int x2, Move move) {
        super(x1, y1, x2, y1);
        this.move = move;
    }

    @Override
    public boolean contains(Point point) {

        if (p1.getY() == point.getY() && point.getX() >= p1.getX() && point.getX() <= p2.getX()) {
            return true;
        }
        return false;
    }
}
